﻿alter procedure [dbo].[usp_AddAndUpdateSprint]    
@ProjectId as int,    
@ReleaseId as int,    
@SprintId as int,  
@SprintDescription as nvarchar(max),  
@SprintStartDate as datetime,  
@SprintEndDate as datetime,  
@Status as int  
as    
    
  
if (@SprintId = null    or @SprintId=0)
insert into TblSprint values     
(@ProjectId,@ReleaseId,    
@SprintDescription,@SprintStartDate,@SprintEndDate,@Status)   
else  
update TblSprint set ProjectId=@ProjectId, ReleaseId=@ReleaseId,  
SprintDescription=@SprintDescription, SprintStartDate = @SprintStartDate,  
SprintEndDate=@SprintEndDate,status=@Status where SprintId=@SprintId  
  
--select * from TblSprint 